feat(ci): promote ci junit-upload from shim to native as a deprecated alias#1468
Closed
Conversation
This was referenced May 27, 2026
This was referenced May 27, 2026
Member
Author
|
This pull request is part of a Mergify stack:
|
This was referenced May 27, 2026
Contributor
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🔴 ⛓️ Depends-On RequirementsWaiting for
This rule is failing.Requirement based on the presence of
🔴 🤖 Continuous IntegrationWaiting for
This rule is failing.
🔴 👀 Review RequirementsWaiting for
This rule is failing.
🔴 🔎 ReviewsWaiting for
This rule is failing.
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 📕 PR descriptionWonderful, this rule succeeded.
|
8078737 to
ed7a74d
Compare
57bb83b to
bd85763
Compare
Member
Author
Revision history
|
bd85763 to
c994e93
Compare
ed7a74d to
6eeb3d9
Compare
e5b9480 to
5474036
Compare
7a63271 to
3f9ccca
Compare
5474036 to
70d22a9
Compare
3f9ccca to
07fd863
Compare
70d22a9 to
ee35991
Compare
07fd863 to
0269117
Compare
Third and final layer of the port: the orchestration that wires
the JUnit parser, OTLP encoder, uploader, and a new quarantine
API client together, plus the native clap dispatch that retires
the Python shim for this subcommand.
Two new modules under `junit_process`:
- `quarantine` POSTs failing test names to
`/v1/ci/<owner>/repositories/<repo>/quarantines/check` and
splits the response into quarantined / non-quarantined buckets.
The categorize step counts unknown names as non-quarantined to
match Python (an API that silently drops a name still blocks
the corresponding failure).
- `command::run` orchestrates the per-invocation flow: resolve
the token / repo / target branch (falling back to the CI-env
detector for the latter two), expand `**`/`*`/`?` patterns into
paths, parse every file, hit the quarantine endpoint, feed the
quarantined set into the OTLP builder so each case span gets
the right `cicd.test.quarantined` value at build time, upload
the gzipped protobuf, and render the report. Network failures
on quarantine or upload are non-fatal — the report calls them
out and the verdict still fires based on
`failing_tests_not_quarantined_count`.
The dispatch layer in `main.rs` promotes
`Subcommands::Ci(CiSubcommand::JunitProcess)` from
`ShimmedArgs` to a full clap variant, adds the
`("ci", "junit-process")` entry to `NATIVE_COMMANDS`, and routes
through `mergify_ci::junit_process::run`. `ci junit-upload`
(deprecated) keeps its shim.
The detector gains `get_tests_target_branch` (base ref OR head
ref) so the orchestrator can derive the branch the quarantine API
should look up tests on without round-tripping through Python.
Output is byte-for-byte the same as the Python implementation's
`process_junit_files` — same separators, same emoji, same
`Run ID`/`Exit code` lines, same `┌ … │ … └─` box-drawn failure
blocks. End-to-end smoke against the live `junit_fail.xml`
fixture exits 1 on a non-quarantined failure and 0 on an
all-pass run, matching Python's contract.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Change-Id: I6bd59de407ddcd4196bdd7e7b8ddb4a88885af7a
…ed alias `junit-upload` is the deprecated alias for `junit-process` — Python's `mergify_cli/ci/cli.py` declares it with click's `deprecated="Use \`junit-process\` instead"` decorator and delegates straight to the same `process_junit_files` body. The shim was still routing it through Python only because the orchestrator wasn't native yet; now that Phase C landed, we can collapse it down to a clap variant that reuses `JunitProcessCliArgs` and dispatches to `mergify_ci::junit_process::run` after printing a `DeprecationWarning: …` line to stderr (matches click's behavior on first invocation). This retires the last `ci` shim — `prepend_two` lost its only remaining caller and goes with it. `stack` is now the only shimmed top-level group left. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Change-Id: Ic316f55c5d8a834cefa5d30ffbf5ebabec0a4122
ee35991 to
951ac81
Compare
0269117 to
1ae26ba
Compare
951ac81 to
dce251a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
junit-uploadis the deprecated alias forjunit-process—Python's
mergify_cli/ci/cli.pydeclares it with click'sdeprecated="Use \junit-process` instead"decorator and delegates straight to the sameprocess_junit_filesbody. The shim was still routing it through Python only because the orchestrator wasn't native yet; now that Phase C landed, we can collapse it down to a clap variant that reusesJunitProcessCliArgsand dispatches tomergify_ci::junit_process::runafter printing aDeprecationWarning: …` line to stderr (matches click's behavioron first invocation).
This retires the last
cishim —prepend_twolost its onlyremaining caller and goes with it.
stackis now the onlyshimmed top-level group left.
Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com
Depends-On: #1467